function [data_trans] = transform_data_01(data_temp,J)

% rearranges data and transforms it to the [0,1] interval via the normcdf
% transform

data_trans = cell(J,1);

for j=1:J
    
    ind_temp = setdiff(1:J,j);
    
    data_trans{j}.x_own = normcdf(data_temp.x(:,j));
    data_trans{j}.z_own = normcdf(data_temp.z(:,j));
    %data_trans{j}.s_own = data_temp.s(:,j);
    
    data_trans{j}.x_other = normcdf(data_temp.x(:,ind_temp));
    data_trans{j}.z_other = normcdf(data_temp.z(:,ind_temp));
    %data_trans{j}.s_other = data_temp.s(:,ind_temp);
    
    data_trans{j}.y = (data_temp.choice==j);
    
    data_trans{j} = struct2dataset(data_trans{j});
    
end

end